const url = require("url");
let urlString1 = "https://space.bilibili.com/478648378/favlist?fid=1191718778&ftype=create";
//解析链接 字符串转对象
let urlObj = new URL(urlString1);
console.log(urlObj);
//对象转字符串
let urlString2 = url.format(urlObj);
console.log(urlString2);

